package demo2;

public class Test {
    public static void main(String[] args) throws CloneNotSupportedException {
        Animal animal1=new Animal();
        animal1.name="hzp";
        animal1.num=1;
        Animal animal2=(Animal) animal1.clone();
        System.out.println(animal1==animal2);
        animal1.name="dzj";
        System.out.println(animal1.name.equals(animal2.name));
        System.out.println(animal1.num==animal2.num);
    }
}
